﻿
namespace EasyXaf.EntityDesigner.ModelBuilders;

public abstract class EntityTypeConfiguration<TEntity> : IEntityTypeConfiguration<TEntity>
{
    public Type EntityType => typeof(TEntity);

    public void Configure(EntityTypeBuilder<TEntity> builder)
    {
        ConfigureCore(builder);
    }

    public void Configure(IEntityTypeBuilder builder)
    {
        ConfigureCore((EntityTypeBuilder<TEntity>)builder);
    }

    protected abstract void ConfigureCore(EntityTypeBuilder<TEntity> builder);
}
